//
//  CoreData.h
//  text
//
//  Created by 杜昕宇 on 15/11/11.
//  Copyright © 2015年 peter. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@interface CoreData : NSObject


@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;

- (void)saveContext;
- (NSURL *)applicationDocumentsDirectory;

/**
 *  单例
 *
 *  @return 返回对象
 */
+ (CoreData *)shareManagerWithFile:(NSString *)filePath;

@end
